class MapLocateAction {
    constructor() {
        this.filterActionType = "map-locate"
    }
    createInitParam(action) {
        action.params["locationType"] = action.params["locationType"] || "point";
        action.params["locationField"] = action.params["locationField"] || "{Lat},{Lon}";
    }
    renderActionConfig(action) {
        let html = `
          <div class="form-group">
            <label>位置形式</label>
            <select id="actionLocationType">
              <option value="point" ${action.params["locationType"] === "point" ? "selected" : ""}>经度+纬度</option>
              <option value="geom" ${action.params["locationType"] === "geom" ? "selected" : ""}>根据Geom字段</option>
            </select>
          </div>
          <div class="form-group">
            <label>格式化位置字段</label>
            <input type="text" id="actionLocationField" value="${action.params["locationField"]}" />
          </div>
        `;
        return html;
    }
    collectActionConfig(action) {
        action.params["locationType"] = document.getElementById("actionLocationType").value;
        action.params["locationField"] = document.getElementById("actionLocationField").value;
    }
}
export default new MapLocateAction();
